package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CoffeeBeanMapper;
import com.ruoyi.system.domain.CoffeeBean;
import com.ruoyi.system.service.ICoffeeBeanService;

/**
 * 咖啡豆信息Service业务层处理
 * 
 * @author Lin
 * @date 2024-02-10
 */
@Service
public class CoffeeBeanServiceImpl implements ICoffeeBeanService 
{
    @Autowired
    private CoffeeBeanMapper coffeeBeanMapper;

    /**
     * 查询咖啡豆信息
     * 
     * @param coffeeId 咖啡豆信息主键
     * @return 咖啡豆信息
     */
    @Override
    public CoffeeBean selectCoffeeBeanByCoffeeId(Long coffeeId)
    {
        return coffeeBeanMapper.selectCoffeeBeanByCoffeeId(coffeeId);
    }

    /**
     * 查询咖啡豆信息列表
     * 
     * @param coffeeBean 咖啡豆信息
     * @return 咖啡豆信息
     */
    @Override
    public List<CoffeeBean> selectCoffeeBeanList(CoffeeBean coffeeBean)
    {
        return coffeeBeanMapper.selectCoffeeBeanList(coffeeBean);
    }

    /**
     * 新增咖啡豆信息
     * 
     * @param coffeeBean 咖啡豆信息
     * @return 结果
     */
    @Override
    public int insertCoffeeBean(CoffeeBean coffeeBean)
    {
        return coffeeBeanMapper.insertCoffeeBean(coffeeBean);
    }

    /**
     * 修改咖啡豆信息
     * 
     * @param coffeeBean 咖啡豆信息
     * @return 结果
     */
    @Override
    public int updateCoffeeBean(CoffeeBean coffeeBean)
    {
        return coffeeBeanMapper.updateCoffeeBean(coffeeBean);
    }

    /**
     * 批量删除咖啡豆信息
     * 
     * @param coffeeIds 需要删除的咖啡豆信息主键
     * @return 结果
     */
    @Override
    public int deleteCoffeeBeanByCoffeeIds(Long[] coffeeIds)
    {
        return coffeeBeanMapper.deleteCoffeeBeanByCoffeeIds(coffeeIds);
    }

    /**
     * 删除咖啡豆信息信息
     * 
     * @param coffeeId 咖啡豆信息主键
     * @return 结果
     */
    @Override
    public int deleteCoffeeBeanByCoffeeId(Long coffeeId)
    {
        return coffeeBeanMapper.deleteCoffeeBeanByCoffeeId(coffeeId);
    }
}
